using System;
using System.Collections.Generic;
using System.Text;

using Crainiate.Data.Persistence;
using Crainiate.Data.Persistence.Providers;

namespace Crainiate.Data.Persistence.Testing
{
    [Serializable]
    public class OrderItem: Table
    {
        private int _OrderId;
        private int _ProductId;
        private int _Quantity;

        public OrderItem()
        {
            
        }

        public OrderItem(Command command): base(command)
        {

        }


        [CompoundKey(0), ForeignKey(typeof(Order))]
        public int OrderId
        {
            get 
            { 
                return _OrderId; 
            }
            set
            { 
                _OrderId = value;
            }
        }
   
        [CompoundKey(1), ForeignKey(typeof(Product))]
        public int ProductId
        {
            get 
            { 
                return _ProductId; 
            }
            set 
            { 
                _ProductId = value;
            }
        }

        [Column]
        public virtual int Quantity
        {
            get 
            { 
                return _Quantity; 
            }
            set
            { 
                _Quantity = value; 
            }
        }
    }
}
